<template>
  <div class="goods-details">
    <header-bar></header-bar>

    <!--填充中间内容，不同的商品描述-->
    <router-view></router-view>

    <!--底部立即购买和加入购物车-->
    <cart-footer v-show="!isSelectPage"></cart-footer>
  </div>
</template>

<script>
  import headerBar from '@/components/public/HeaderBar'
  import goodsDetails from './goodsDetails'
  import cartFooter from './cartFooter'

  export default {
    name: 'GoodsDetails',
    data () {
      return {}
    },
    components: {
      headerBar,
      goodsDetails,
      cartFooter
    },
    computed: {
      isSelectPage () {
        console.log('detail index: ', this.$route.path.indexOf('select') >= 0)
        return this.$route.path.indexOf('select') >= 0
      }
    }
  }
</script>

<style scoped>
  .details-container {
    margin-bottom: 1.38667rem;
  }
</style>
